home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / BBS / HERMES / ProtMover6.1.cpt / Protocol.h < prev    next >
Text File  |  1990-05-29  |  3KB  |  166 lines

  1. typedef struct {
  2.     StringHandle fName;
  3.     StringHandle mbName;
  4.     int vRefNum;
  5.     long dirID;
  6.     long fileID;
  7. } FListRec, *FListPtr;
  8.  
  9. typedef struct {
  10.     int mRefIn;
  11.     int mRefOut;
  12.     int procID;
  13.     Handle protoData;
  14.     StringHandle errReason;
  15.     int timeOut;
  16.     int fileCount;
  17.     int filesDone;
  18.     long bytesDone;
  19.     long bytesTotal;
  20.     long startTime;
  21.     union {
  22.         unsigned int word;
  23.         struct {
  24.             int transMode : 1;
  25.             int stopTrans : 1;
  26.             int carrierLost : 1;
  27.             int useMacBinary : 1;
  28.             int newMBName : 1;
  29.             int newError : 1;
  30.             int newFile : 1;
  31.             int Recovering : 1;
  32.             int reserved : 8;
  33.         } B;
  34.     } F;
  35.     FListRec fList[];
  36. } ProtoRec, *ProtoRecPtr, **ProtoRecHandle;
  37.  
  38. /*    Messages passed to the PROC */
  39.  
  40. #define        SEND            0
  41. #define        RECEIVE            1
  42. #define        SETPREFS        2
  43.  
  44. #define        BUILDTMENU        99
  45. #define        BUILDMENU        100
  46. #define        ABLEMENU        101
  47. #define        DOMENU            102
  48. #define        DISPOSEPREC        103
  49. #define        DISPOSEMENU        104
  50. #define        BUILDDAMENU        105
  51.  
  52. /*    StackSaver structures */
  53.  
  54. typedef struct {
  55.     Handle stackData;
  56.     long originalSP;
  57.     long jumpBack;
  58.     long startTime;
  59. } SSaverRec, *SSaverPtr;
  60.  
  61. /*    StackSaver prototypes */
  62.  
  63. extern void Return(int timeOut,SSaverPtr SSP);
  64. extern OsErr JumpBack(int message,ProtoRecPtr prp,
  65.                             long refCon,SSaverPtr SSP,OsErr procPtr());
  66.  
  67. typedef struct {
  68.     long CurDirStore;
  69.     char vName[64];
  70. } UtilPref, *UtilPrefPtr, **UtilPrefHandle;
  71.  
  72. typedef struct {
  73.     int pFlags;
  74.     long refCon;
  75.     Str255 subName;
  76.     Str255 autoCom;
  77. } ProcSub;
  78.  
  79. typedef struct {
  80.     int SubCount;
  81.     /*    sub function descriptions follow */
  82. } PInf, *PInfPtr, **PInfHandle;
  83.  
  84. typedef struct {
  85.     int matchChar;
  86.     long menuSelect;
  87.     char autoCom[];
  88. } AutoComRec, *AutoComPtr, **AutoComHandle;
  89.  
  90. typedef struct {
  91.     int procID;
  92.     int itemID;
  93.     int HmenuID;
  94.     int HitemID;
  95.     StringHandle subName;
  96.     int pFlags;
  97.     int funcMask;
  98.     long refCon;
  99. } ProcList;
  100.  
  101. typedef struct {
  102.     int pMode;                    /*    set to either TERMINALMODE or BBSMODE */
  103.     MenuHandle pMenu;            /*    set to "transfer" menu */
  104.     void (*doUpdate)();            /*    use for updating when in Help */
  105.     int transIndex;                /*    filled in for calling PROCs */
  106.     int transMessage;            /*    filled in for calling PROCs */
  107.     long transRefCon;            /*    filled in for calling PROCs */
  108.     ProtoRecHandle transData;    /*    filled in for calling PROCs */
  109.     int pCount;
  110.     int firstID;
  111.     int foldID;
  112.     int helpID;
  113.     int autoCount;
  114.     AutoComHandle autoComs;
  115.     ProcList pList[];
  116. } ProcMenu, *ProcMenuPtr, **ProcMenuHandle;
  117.  
  118. #define        PROCINDEX        10
  119.  
  120. #define        TERMINALMODE    0
  121. #define        BBSMODE            1
  122.  
  123. #define        CANSEN            0x8000
  124. #define        CANREC            0x4000
  125. #define        CANBSEN            0x2000
  126. #define        CANBREC            0x1000
  127. #define        SENFLOW            0x0800
  128. #define        RECFLOW            0x0400
  129. #define        CONTREC            0x0200
  130. #define        SETERMPREF        0x0100
  131. #define        SETBBSPREF        0x0080
  132.  
  133. /*    Structures and defines for Eric Berman's Help Editor system */
  134.  
  135. typedef struct {
  136.     Str255 help_String;
  137.     int help_ID;
  138.     ResType help_Type;
  139. } Help_List_Type, *Help_List_Ptr, **Help_List_Handle;
  140.         
  141. typedef struct {
  142.     int varCode;
  143.     int Dialog_ID;
  144.     ResType Help_Type;
  145.     Handle the_Help;
  146.     int Num_Types;
  147.     ResType *Res_Types;
  148.     Help_List_Handle topic_List;
  149.     Str255 message;
  150.     Point upper_Left;
  151.     void (*update_Proc)();
  152.     int (*map_Hook)();
  153. } Block_Record, *Block_Ptr;
  154.  
  155. #define        ShowTopic_Trap                1
  156. #define        TextMenu_Trap                2
  157. #define        FindLabel_Trap                3
  158. #define        DrawGraphicMenu_Trap        4
  159. #define        GraphicMenu_Trap            5
  160. #define        GetTopicList_Trap            7
  161. #define        ShellSort_Trap                8
  162. #define        ShowTopicList_Trap            9
  163.  
  164. #define        Text_List_ID                901
  165. #define        Topic_Window_ID                902
  166.